/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
 *
 */

import { AbstractPackageHar } from '../../abstract/abstract-package-har.js';
import { TaskNames } from '../../common/task-names.js';
import { TargetTaskService } from '../../service/target-task-service.js';
import { LegacyProcessHarArtifacts } from './legacy-process-har-artifacts.js';
import LegacyFATask = TaskNames.LegacyFATask;

/**
 * 打包Fa模型的Har包
 *
 * @since 2021/12/18
 */
export class LegacyPackageHar extends AbstractPackageHar {
  protected readonly taskTmpDir: string;
  constructor(taskService: TargetTaskService) {
    super(taskService, LegacyFATask.PACKAGE_HAR);
    this.taskTmpDir = this.getTaskTempDir(this.targetData, undefined, false);
  }

  initTaskDepends() {
    this.declareDepends(LegacyProcessHarArtifacts.name);
  }
}
